package lab02.test07;

public class Person {
    //属性:姓名、年龄、身份证号
    private String name;
    private int age;
    private long idnum;
//方法：输出属性
    public String toString(){
        return "姓名："+name +"\n"+"年龄："+age+"\n"+"身份证号："+idnum;
    }
//构造方法初始化private的的值
    Person(){}
    Person(String name,int age,long idnum){
        this.name = name;
        this.age = age;
        this.idnum = idnum;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public long getIdnum() {
        return idnum;
    }

    public void setIdnum(long idnum) {
        this.idnum = idnum;
    }
}
